<table width="100%">
<tr>
	<td valign="middle" colspan="3">
		<span style="padding-left:20">
			<strong style="padding-right:5; padding-left:5"><?php echo Place?>:</strong>
			<select name="listplace" onchange="<?php echo selectAction('place','status='.$status)?>" style="width: 150">
				<option value='-1'><?php echo All?></option>
				<?php echo list_place_Ad($place)?>
			</select>
		</span>
		<span style="padding-left:20">
			<strong style="padding-right:5; padding-left:5"><?php echo Status?>:</strong>
			<select name="liststatus" onchange="<?php echo selectAction('status','place='.$place)?>" style="width: 150">
				<option value='-1'><?php echo All?></option>
				<?php echo Liststatus($status)?>
			</select>
		</span>
	</td>
</tr>
<tr>
<td colspan="3">

<form name="form_admin" method="post" action="<?php echo formAction('updatestatus')?>">

<table width="100%" cellpadding="0" cellspacing="1"  id="tblsort">
  <tr class="headtb" nodrop="true" nodrag="true">
  	<td width="5%"><?php echo inputCheckAll()?></td>
    <td width="20%"><?php echo _NAME?></td>
	<td width="200"><?php echo Address?></td>
	<td width="100"><?php echo Phone?></td>
	<td width="100"><?php echo Place?></td>
	<td width="100"><?php echo Status?></td>
    <td width="100"><?php echo Actions?></td>
  </tr>
  <?php
  foreach ($advertises as $i=>$advertise)
  {
  ?>
	  <tr>
	  	<td align="center">
          <?php echo inputCheck($advertise['iAdvertiseId'])?>
	  		<input type="hidden" id="listorder_<?php echo $i?>" name="listorder[]"
				value="<?php echo getOrderList($i)?>"/>
			<input type="hidden" name="Listid[]" value="<?php echo $advertise["iAdvertiseId"]?>" />
		</td>
		<td style="padding-left:10">
			<?php echo linkAction('edit',$advertise["cName"],'id='.$advertise['iAdvertiseId'])?>
		</td>
		<td align="center">
			<?php echo $advertise['cAddress']?>
		</td>
		<td align="center">
			<?php echo $advertise['cPhone']?>
		</td>
		<td align="center">
			<select name="ListPlace[]" id="listplay<?php echo $i?>" style="width:100">
				<?php echo list_place_Ad($advertise['iPlace']);?>
			</select>
		</td>
		<td align="center">
			<select name="ListStatus[]" id="ListStatus<?php echo $i?>" style="width:80">
				<?php echo Liststatus($advertise['iStatus']);?>
			</select>
		</td>
		<td align="center" width="100">
            <?php echo linkAction('edit',_EDIT,'id='.$advertise['iAdvertiseId'])?>
             -
			<?php echo linkAction('delete',_DELETE,'id='.$advertise['iAdvertiseId'])?>
		</td>
	  </tr>
  <?php
  }
   if(count($advertises)==0)
  {
	?>
		<tr>
			<td colspan="6" align="center" style="color:#FF0000">Not found Advertise</td>
		</tr>
	<?php
   }
  ?>
</table>
</td>
</tr>
<tr>
	<td><?php echo $show_page?></td>
</tr>
</table>
</form>

<script type="text/javascript">
var tbdnd=new TableDnD;
tbdnd.init("tblsort");
</script>